/**
 * 
 */
package org.perfect.batch.api;

import java.util.Map;

/**
 * @author billmse
 *
 */
public interface IBatchService {
	
	/**
	 * start job immediately
	 * 
	 * @param jobName
	 * @return
	 */
	String startJob(String jobName);

	/**
	 * start job according to parameters
	 * 
	 * @param jobName
	 * @param parameters
	 * @return
	 */
	String startJob(String jobName, Map<String, String> parameters);
	
	/**
	 * stop job
	 * 
	 * @param jobExecutionId
	 * @return
	 */
	Boolean stopJob(Long jobExecutionId);
	
	/**
	 * restart job
	 * 
	 * @param jobExecutionId
	 * @return
	 */
	Long restartJob(Long jobExecutionId);

	/**
	 * execute step
	 * 
	 * @param jobExecutionId
	 * @param stepExecutionId
	 */
	void executeStep(Long jobExecutionId, Long stepExecutionId);

}
